<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1{
            width: 500px;
            height: 500px;
            background-color: chartreuse;
        }
        .div2{
            width: 350px;
            height: 350px;
            background-color: rgb(30, 129, 187);
        }
        .div3{
            width: 200px;
            height: 200px;
            background-color: rgb(218, 115, 19);
        }
    </style>
</head>
<body>
    <div class="div1">
    <div class="div2">
        <div class="div3"></div>
    </div>

    </div>
   

    <script>
document.querySelector(".div1").onclick=function(e){
    console.log("我被点啊1")

}
document.querySelector(".div2").onclick=function(e){
    console.log("我被点啊2")
}
document.querySelector(".div3").onclick=function(e){
    console.log("我被点啊3")
    e.stopPropagation()
}


    </script>
</body>
</html>
